import * as compress from "compressing"

export class Zip{
    /**
     * 压缩指定文件夹为zip文件
     * @param path 指定路径
     * @param outFile 输出文件
     * @returns 
     */
    static compressFunc(path:string,outFile:string){
        console.log("path##",path," out##",outFile);
        return  new Promise<void>((resolve,reject)=>{
                compress.zip.compressDir(path,outFile)
                .then(()=>{
                    console.log("success")
                    resolve();
                })
                .catch((err)=>{
                    console.log(err)
                    reject(err);
                })
        });        
    }
}